<script setup lang="ts">
import { toRefs } from "vue";
import { IRouter } from "@/utils/types/TMenu.ts";
const props = defineProps<{
  menuInfo: IRouter;
}>();
const { menuInfo } = toRefs(props);
</script>

<template>
  <template v-if="!menuInfo.hidden">
    <a-menu-item
      :key="
        menuInfo.children?.length && menuInfo.menuType == 'C'
          ? menuInfo.children[0].path
          : menuInfo?.path
      "
    >
      <JIcon
        v-if="menuInfo.meta.icon"
        :type="menuInfo.meta.icon"
        style="font-size: 20px"
      />
      <span>{{ menuInfo.meta.title }}</span>
    </a-menu-item>
  </template>
</template>
